互联网知识

精准传达 • 价值共享

洞悉互联网前沿资讯,探寻网站营销规律

查看其它板块

织梦DEDECMS城市分站伪静态规则

作者:狐灵科技 | 2020-03-22 22:18 |点击:

上一篇文章写了织梦多城市插件安装图文教程【伪静态版】

这篇文章给大家分享一下分站的伪静态规则其中包含 .htaccess,bcloud_nginx_user.conf,Nginx宝塔,以及web.config

.htaccess 是Apache的静态文件

bcloud_nginx_user.conf是百度云主机的静态文件


Nginx是linux宝塔的伪静态文件,复制里面的内容到伪静态设置即可。


web.config 是IIS的静态文件

——————————————————————


.htaccess 伪静态规则

  1. RewriteEngine On
    RewriteRule ^.*list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 
     
    RewriteRule ^.*list-([0-9]+).html$ /plus/list.php?tid=$1
     
    RewriteRule ^.*view-([0-9]+).html$ /plus/view.php?arcID=$1
     
    RewriteRule ^.*/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2
    RewriteRule ^.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2
     
    RewriteRule ^tags/([^-]+).html$ /tags.php?/$1/
    RewriteRule ^.*/tags/([^-]+).html$ /tags.php?/$1/
     
    RewriteRule ^tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2
    RewriteRule ^.*/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2
     
    RewriteRule ^index.html$ index.php
    RewriteRule ^.*/index.html$ index.php


bcloud_nginx_user.conf 伪静态规则


  1. rewrite ^/.*list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3;
    rewrite ^/.*list-([0-9]+).html$ /plus/list.php?tid=$1;
    rewrite ^/.*view-([0-9]+).html$ /plus/view.php?arcID=$1;
    rewrite ^/.*/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
    rewrite ^/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
    rewrite ^/tags/([^-]+).html$ /tags.php?/$1/;
    rewrite ^/.*/tags/([^-]+).html$ /tags.php?/$1/;
    rewrite ^/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
    rewrite ^/.*/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
    rewrite ^/index.html$ /index.php;
    rewrite ^/.*/index.html$ /index.php;

宝塔Nginx伪静态规则


  1. rewrite ^/.*list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3;
    rewrite ^/.*list-([0-9]+).html$ /plus/list.php?tid=$1;
    rewrite ^/.*view-([0-9]+).html$ /plus/view.php?arcID=$1;
    rewrite ^/.*/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
    rewrite ^/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
    rewrite ^/tags/([^-]+).html$ /tags.php?/$1/;
    rewrite ^/.*/tags/([^-]+).html$ /tags.php?/$1/;
    rewrite ^/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
    rewrite ^/.*/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
    rewrite ^/index.html$ /index.php;
    rewrite ^/.*/index.html$ /index.php;
     


web.config 是IIS的伪静态规则

  1. <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <clear />
                    <rule name="tool.apizl.com rewriteTools1" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*list-([0-9]+)-([0-9]+)-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/plus/list.php?tid={R:1}&amp;totalresult={R:2}&amp;PageNo={R:3}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools3" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*list-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/plus/list.php?tid={R:1}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools5" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*view-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/plus/view.php?arcID={R:1}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools7" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*/.*-([0-9]+)-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/plus/view.php?aid={R:1}&amp;pageno={R:2}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools8" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*-([0-9]+)-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/plus/view.php?aid={R:1}&amp;pageno={R:2}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools10" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^tags/([^-]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools11" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*/tags/([^-]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools13" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^tags/([^-]+)-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools14" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*/tags/([^-]+)-([0-9]+).html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools16" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^index.html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="index.php" appendQueryString="false" />
                    </rule><rule name="tool.apizl.com rewriteTools17" patternSyntax="ECMAScript" stopProcessing="false">
                        <match url="^.*/index.html" ignoreCase="false" />
                        
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="index.php" appendQueryString="false" />
                    </rule>
                </rules>
            </rewrite>
            <httpErrors>
     
    </httpErrors>
        </system.webServer>
    </configuration>

以上就是 织梦DEDECMS城市分站伪静态规则
如没特殊注明,文章均为狐灵科技原创,转载请注明  https://www.hulingweb.cn/hulianwang/1115.html
多一份免费策划方案,总有益处。

请直接添加技术总监微信联系咨询

网站设计 品牌营销

多一份参考,总有益处

联系狐灵科技,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:023-68168040 / 大客户专线:15523356218